# -*- coding:utf-8 -*-

import yaml

s = " I have an apple"
print yaml.dump(s)

lists = ['zhangsan', 'lisi', 'wangwu', 'zhaoliu']
print yaml.dump(lists)

class Person(object):
    def __init__(self, name, age):
        self.name = name
        self.age = age

p1 = Person('zhangsan', 19)
p2 = Person('lisi', 20)
p3 = Person('wangwu', 21)

persons = [p1, p2, p3]

print yaml.dump(persons)
